{include file="pageheader.htm"}
<div class="main-div">
<form method="post" action="role_action.php" name="theForm"  onsubmit="return validate()">
<table cellspacing="1" cellpadding="3" width="100%">
  <tr>
    <td class="label">模块名称</td>
    <td><input type="text" name="action_name" maxlength="60" size = "30" value="{$action.action_name|escape}" /><span class="require-field">*</span></td>
  </tr>
    <tr>
    <td class="label">模块代码:</td>
    <td>
      <input type="text" name='action_code' maxlength="60" size = "30" value="{$action.action_code|escape}"/><span class="require-field">*</span>
    </td>
  </tr>
  
      <tr>
    <td class="label">模块URL:</td>
    <td>
      <input type="text" name='action_url' maxlength="60" size = "30" value="{$action.action_url|escape}"/><span class="require-field">*</span>
    </td>
  </tr>
  
  <tr>
    <td class="label">导航是否显示:</td>
    <td>
     <input type="radio" name="flag" value="1">显示
     <input type="radio" name="flag" value="0">不显示
    </td>
  </tr>
  <tr>
    <td class="label">上级模块</td>
    <td>
      <select name="parent_id" onchange="actionChanged()" {if $disabled }disabled="disabled"{/if} >
        <option value="0">上级模块</option>
        <!--{foreach from=$action_select item=action_list}-->
         <option value="{$action_list.action_id}" {if $action_list.action_id==$action.parent_id}selected{/if}>{$action_list.action_name}</option>
        <!--{/foreach}-->
      </select>
    </td>
  </tr>

  <tr>
    <td colspan="2" align="center"><br />
      <input type="submit" class="button" value="{$button_value}" />
      <input type="reset" class="button" value="重置" />
      <input type="hidden" name="act" value="{$form_action}" />
      <input type="hidden" name="id" value="{$action.action_id}" />
    </td>
  </tr>
</table>
</form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="JavaScript">
<!--
/**
 * 检查表单输入的数据
 */
function validate()
{
    validator = new Validator("theForm");
    validator.required("action_name",  '没有输入模块的名称!');
	validator.required("action_code",  '没有输入模块的代码!');
	validator.required("action_url",  '没有输入模块的URL!');
    return validator.passed();
}

//-->
</script>
{/literal}
{include file="pagefooter.htm"}